package com.springBoot.test01.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.springBoot.pojo.User;
import com.springBoot.test01.mapper.UserMapper01;
import com.springBoot.test01.service.UserService01;
import com.springBoot.test02.mapper.UserMapper02;

@Service("userServiceImpl01")
public class UserServiceImpl01 implements UserService01 {

	@Autowired
	private UserMapper01 userMapper01;
	@Autowired
	private UserMapper02 userMapper02;

	public List<User> getUser01() {
		return null;
	}

	@Transactional
	public Integer addUser1(String loginName, int i) {
		int addUser1 = userMapper01.addUser1(loginName, "x徐晓辉", "123");
		int addUser2 = userMapper02.addUser2(loginName, "x徐晓辉", "123");
		int j = 1 / i;
		System.err.println(j);
		return addUser1 + addUser2;
	}

}
